summaryrefslogtreecommitdiff
path: root/app/[lng]/sales/(sales)/tech-contact-possible-items/page.tsx
blob: 5bc367902937be5494004e3644ba3a0223292217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { Suspense } from "react"
import { SearchParams } from "@/types/table"
import { Shell } from "@/components/shell"
import { ContactPossibleItemsTable } from "@/lib/contact-possible-items/table/contact-possible-items-table"
import { getContactPossibleItems } from "@/lib/contact-possible-items/service"
import { searchParamsCache } from "@/lib/contact-possible-items/validations"
import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"


interface ContactPossibleItemsPageProps {
  searchParams: Promise<SearchParams>
}

export default async function ContactPossibleItemsPage({
  searchParams,
}: ContactPossibleItemsPageProps) {
  const resolvedSearchParams = await searchParams
  const search = searchParamsCache.parse(resolvedSearchParams)

  const contactPossibleItemsPromise = getContactPossibleItems(search)

  return (
    <Shell className="gap-2">
      <div className="flex items-center justify-between space-y-2">
        <div className="flex items-center justify-between space-y-2">
          <div>
          <h2 className="text-2xl font-bold tracking-tight">
            담당자별 자재 관리
          </h2>
          {/* <p className="text-muted-foreground">
            기술영업 담당자별 자재를 관리합니다.
          </p> */}
        </div>
      </div>
      </div>


        <Suspense
          fallback={
            <DataTableSkeleton
              columnCount={12}
              searchableColumnCount={2}
              filterableColumnCount={3}
              cellWidths={["10rem", "10rem", "12rem", "8rem", "8rem"]}
              shrinkZero
            />
          }
        >
          <ContactPossibleItemsTable 
            contactPossibleItemsPromise={contactPossibleItemsPromise}
          />
        </Suspense>

    </Shell>
  )
}